package com.lfd.controller;

import java.util.ArrayList;
import java.util.List;

import org.apache.log4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.lfd.service.IModuleService;
import com.lfd.vo.ModuleVo;

@RestController
@RequestMapping("/menu")
public class ModuleController {
	private final Logger logger=Logger.getLogger(ModuleController.class);
	
	@Autowired
	private IModuleService modlueService;
	
	@RequestMapping("/getList")
	public List<ModuleVo> list(){
		try {
			return modlueService.getModules();
		} catch (Exception e) {
			logger.error("查询菜单失败", e);
			return new ArrayList();
		}
	}

}
